package com.anjubao.parking.municipal.roadside.constant;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author anjubao
 */
@Getter
@AllArgsConstructor
public enum DeviceIsOnlineEnum {

    OffLine(0, "断线"),
    OnLine(1, "在线");


    private int code;

    private String desc;

    public static DeviceIsOnlineEnum getByCode(int code) {
        for (DeviceIsOnlineEnum typeEnum : values()) {
            if (typeEnum.getCode() == code) {
                return typeEnum;
            }
        }
        return null;
    }

}



